package com.rymcu.subject.service;

import com.rymcu.subject.dto.SubjectQuestionDTO;
import com.rymcu.subject.entity.Question;
import com.rymcu.subject.entity.QuestionBase;
import com.rymcu.subject.entity.SubjectQuestion;

import java.util.Collection;
import java.util.Date;
import java.util.List;

public interface SubjectQuestionService {


    long insertSelective(SubjectQuestion record);

    int updateByPrimaryKeySelective(SubjectQuestion record);


    SubjectQuestionDTO getNextByUserId(Long userId);
    long getNextIdByUserId(Long userId);


    /**
     * @param sqId
     * @return
     */
    Question selectBySqId(long sqId);

    int countList(QuestionBase questionBase);

    /**
     * 通过题目编号id来获取题列表
     *
     * @param sqIdList
     * @return
     */
    List<Question> listBySqId(List<Integer> sqIdList);

    /**
     * 查询符合条件的题目编号列表
     *
     * @param questionBase
     * @return
     */
    List<Integer> sqIdList(QuestionBase questionBase);

    Collection<? extends SubjectQuestionDTO> getAnswerRecord(
            long userId,
            Date now,
            boolean everydayFlag
    );

    /**
     * 通过id获取对应试题
     * @param id
     * @return
     */
    SubjectQuestionDTO getById(Long id);
}
